package com.zzgele.qmzb.api.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.zzgele.qmzb.api.core.AbstractService;
import com.zzgele.qmzb.api.dao.AnchorLogMapper;
import com.zzgele.qmzb.api.model.AnchorLog;
import com.zzgele.qmzb.api.model.User;
import com.zzgele.qmzb.api.service.AnchorLogService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Condition;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by Martin on 2017/08/04.
 */
@Service(interfaceClass = AnchorLogService.class,proxy="jdk")
@Component
@Transactional
public class AnchorLogServiceImpl extends AbstractService<AnchorLog> implements AnchorLogService {
    @Resource
    private AnchorLogMapper anchorLogMapper;

    @Override
    public List<AnchorLog> findByConditions(Long login_uid, String uuid) {
        Condition condition = new Condition(User.class);
        condition.createCriteria().andCondition("uid="+login_uid+" and uuid="+uuid );
        return anchorLogMapper.selectByCondition(condition);
    }
}
